﻿<!--#include virtual="/Common/Config.asp" -->
<!--#include virtual="/Common/conn.asp" -->
<!--#include virtual="/2010admin/Check_IsLogin.asp" -->
<!--#include virtual="/Common/Function.asp" -->
<!--#include virtual="/2010admin/Common/Query_List_GetSQL.asp"-->
<!--#include virtual="/2010admin/Check_Priv.asp"-->

<%
'==========================================
'**********	Modify  Start  ****************
dim TITLE,DISPFILD,PAGESIZE,SQL,HV
dim AddLabel,addURL,delURL,editURL,detailURL,detailURLsn
TITLE="友情链接查询"
DISPFILD="Site_Name<网站名称,Site_Url<网站地址,Link_Type_S<链接类型,Site_Order<顺序,Site_Flag_S<使用标志,Update_Date<更新日期"
PAGESIZE="20"
HV="H"

AddLabel="增加新友情链接"
addURL="Friend_Link_Add.asp"
delURL="friend_link_Del.asp"
editURL="friend_link_Edit.asp"


detailURLsn=1

'置顶排序分类
Sort_Name="友情链接"

'设置置顶文件
Set_Top_URL = "friend_link_Set_Top.asp"

'排序操作文件
Sort_Url 	= "friend_link_Sort.asp"

Sort_Title  = "排序"

sql = "SELECT Site_ID,Site_Name,Site_Url,Link_Type,CASE Link_Type "&_
	  " WHEN 1 THEN '图片' " &_
	  " WHEN 0 THEN '文字' " &_
	 " WHEN 2 THEN '特别推荐' " &_
      " END AS Link_Type_S" &_

	  ",Site_Order,CASE Site_Flag "&_
	  " WHEN 1 THEN '使用' " &_
	  " WHEN 0 THEN '未使用' " &_
      " END AS Site_Flag_S" &_

	  ",Update_Date"&_
	  " FROM friend_link WHERE 1=1  "

Site_Name		= reform("Site_Name")

sql = LikeSql("Site_Name",Site_Name,sql)

sql = sql &" ORDER BY Site_ID DESC "


'Debug SQL

'**********	Modify  Stop  *****************
'==========================================

If Request.form("previous")="上一页" Then PageNo=request.form("PageNo")-1
If Request.form("next")="下一页" Then PageNo=request.form("PageNo")+1
If Request.form("GotoPageNo")<>"" Then PageNo=request.form("GotoPageNo")
If Request.form("GotoPageNo2")<>"" Then	PageNo=request.form("GotoPageNo2")
%>

<HTML>
<HEAD>
<TITLE><%=Title%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="/2010admin/css/default.css" type="text/css" rel="stylesheet">
</HEAD>
<script language="javascript" src="/2010admin/js/function.js"></script>


<BODY BGCOLOR="#FFFFFF"><br>
<form method="post" name="form">
<TABLE cellSpacing=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD width="43%" align=left><FONT size=4><B><%=TITLE%></B></FONT>
	<%if addURL<>"" then%>
	<%=GetSpace(4)%><input type='button' class='inputbutton' value='<%=AddLabel%>' name='add' onClick="window.location.href='<%=addURL%>'">
	<%end if%>
	<% If Sort_Title<>"" Then %>
	<input type='button' class='inputbutton' value='<%=Sort_Title%>' name='add' onClick="window.location.href='<%=Sort_URL%>'">
	<% End If %>
	</TD>
    <TD width="37%" align=right>&nbsp;
         <TABLE cellSpacing=0 cellPadding=1 border=0>
        <TR>
          <TD>网站名称</TD>
        </TR>
        <TR>
          <TD><INPUT name="Site_Name" class=inputtext id="Site_Name" Value="<%=Site_Name%>" size=10></TD>
       </TR>
	   </TABLE>
   
	</TD>
    <TD vAlign=middle width="20%"> &nbsp;&nbsp;
      <INPUT type="submit" class="button" value="搜索" name="search">&nbsp; 
	<br></TD>
  </TR>
  </TBODY>
</TABLE>
<HR SIZE=1>
<%
IF NOT Query_List_GetSQL(DISPFILD,SQL,PAGESIZE,HV,delURL,editURL,detailURL,detailURLsn) THEN
	Response.Write "<br><BR><center><font size=2><font color=#ff0000>程序执行错误！请与系统管理员联系！"
END If

Call conn_close()

%>
</FORM>
</BODY>
</HTML>
